package c.j.a.d.b.o;

import android.app.Notification;
import android.content.Context;
import android.content.Intent;
import c.j.a.d.b.e.b;
import com.ss.android.socialbase.downloader.e.a;
import com.ss.android.socialbase.downloader.notification.DownloadNotificationService;
import java.util.Objects;

/* compiled from: AbsNotificationItem */
public abstract class c {
    public int a;
    public long b;
    public long c;
    public String d;
    public int e = 0;
    public long f;
    public int g;
    public boolean h;
    public Notification i;

    public c(int i, String str) {
        this.a = i;
        this.d = str;
    }

    public void a(int i, a aVar, boolean z, boolean z2) {
        if (z2 || this.e != i) {
            this.e = i;
            c(null, z);
        }
    }

    public void b(Notification notification) {
        if (this.a != 0 && notification != null) {
            d a = d.a();
            int i = this.a;
            int i2 = this.e;
            Objects.requireNonNull(a);
            Context a2 = b.a();
            if (a2 != null && i != 0) {
                try {
                    Intent intent = new Intent(a2, DownloadNotificationService.class);
                    intent.setAction("android.ss.intent.action.DOWNLOAD_NOTIFICATION_NOTIFY");
                    intent.putExtra("DOWNLOAD_NOTIFICATION_EXTRA_STATUS", i2);
                    intent.putExtra("DOWNLOAD_NOTIFICATION_BUNDLE_EXTRA_ID", i);
                    intent.putExtra("DOWNLOAD_NOTIFICATION_BUNDLE_EXTRA", notification);
                    a2.startService(intent);
                } catch (Throwable th) {
                    th.printStackTrace();
                }
            }
        }
    }

    public abstract void c(a aVar, boolean z);

    public void d(com.ss.android.socialbase.downloader.g.c cVar) {
        if (cVar != null) {
            this.a = cVar.g0();
            this.d = cVar.j0();
        }
    }
}
